<template>
    <view>
        <text>{{ content }}</text>
    </view>
</template>

<script setup>
import { onMounted, watch } from '@vue/composition-api'

const props = defineProps({
    messageId: Number,
    content: String,
})

watch(() => props.content, (value, oldValue) => {
    console.log(`message ${props.messageId} changes content: ${value} <-- ${oldValue}`)
})

onMounted(() => {
    console.log(`message ${props.messageId} mounted`)
})
</script>
